/*
 *  登录
 *
 * @Author:    :：陈玉强
* @Date:      2025-09-03 21:59:58

 * @Email:     soc
 * @Copyright  SOC （ https://1024lab.net ），Since 2012
 */
import { getRequest, postRequest } from '@/lib/smart-request';

export const loginApi = {
  /**
   * 登录 @author 陈玉强
   */
  login: (param) => {
    return postRequest('/login', param);
  },

  /**
   * 退出登录 @author 陈玉强
   */
  logout: () => {
    return getRequest('/login/logout');
  },

  /**
   * 获取验证码 @author 陈玉强
   */
  getCaptcha: () => {
    return getRequest('/login/getCaptcha');
  },

  /**
   * 获取登录信息 @author 陈玉强
   */
  getLoginInfo: () => {
    return getRequest('/login/getLoginInfo');
  },
   /**
   * 获取双因子登录标识 @author 陈玉强
   */
   getTwoFactorLoginFlag: () => {
    return getRequest('/login/getTwoFactorLoginFlag');
  },
    /**
   * 获取邮箱登录验证码 @author 陈玉强
   */
    sendLoginEmailCode: (loginName) => {
      return getRequest(`/login/sendEmailCode/${loginName}`);
    },
  
};
